<?php
/**
 * 问答社区管理员微信客户端
*/
class Commwapadmin extends Base_Controller
{
    public function __construct()
    {
        parent::__construct();
    }

    public function downloadTempMedia()
    {
        $post = $this->input->post();
        if (!isset($post['mediaid'])) $this->error('lack mediaid');
        else $mediaid = $post['mediaid'];
        $this->config->load('weixin');
        $appid = $this->config->item('nldou_fuwu_appid');
        $appsecret = $this->config->item('nldou_fuwu_appsecret');
        $wxtype = $this->config->item('nldou_fuwu_type');
        $this->load->library("wxinterface/Wxinterface",array("appid"=>$appid,"appsecret"=>$appsecret,"wxtype"=>$wxtype));
        $res = $this->wxinterface->download_temp_voice($mediaid);
        $this->success($res);
    }

}